Functions

This section is all about definitions and can be read quickly and then put aside until needed. Indeed, skipping over it is recommended.

An interval is a sequence of defined number types that proceeds orderly from a beginning to an end. An open interval does not include its beginning and end points and is indicated by parenthesis. For example, the interval $0 < x < 5\quad x\in\mathbb{R}$ can be indicated as $x\in R$ such that $x=(0,5)$. A closed interval does include its endpoints and is indicated by square brackets. $$x\in R\;:\;0\le x\le5\rightarrow x=[0,5]$$ A way to remember the notation is that the bracket, having an obvious corner point, means to include the corner or end points, while a parenthesis excludes the same. Some authors use brackets turned the wrong way, $]0,5[,$ for the closed interval symbol. Mixing symbols, $[a,b)$ means the interval is closed on the $a$ end and open on the $b$ end.

A relation is a set of ordered pairs and usually we mean ordered pairs of numbers. By the word ordered, we mean that the set of pair values must not be rearranged. The “ordering” permits making a graph of the relation. An example of a relation is the following. $$\left\{ (-1,3),(0,6),(1,5),(2,4),(3,8),(4,16)\right\} $$ Within each tuple, we could let the first element be the $x$ coordinate and the second element be the $y$ coordinate and then construct a graph of the relation. Most often, the ordering is such that the $x$ value in the tuple continuously increases, but that is not a requirement. The following relation does not follow the increasing $x$ pattern. Indeed the two $x$ values are the same and there are two different $y$ values. Still, it is a relation. If we were to swap the pairs, it would be a different relation. The “ordering” is of the pairs. $$\left\{ (0.5,\,0.87),(0.5,\,-0.87)\right\}$$ A function is a relation for which each $x$ value is uniquely related to one and only one $y$ value. The $x$ values are called the domain of the function. [Usually, the domain is graphed on the $x$ axis.] The $y$ values come from the codomain. The range is a subset of the codomain (which of course could be all of it) and is the set of all possible outputs. The codomain, for example, might include all of $\mathbb{R}$ but the function might restrict the output to some subset of $\mathbb{R}$ and that subset is the range. “Range” is used, including in this text, but for careful writing one might best define it in context.

Maths uses the word range for two different ideas. The “range of a function” is a set containing all possible output values. So for example $f:\mathbb{R\rightarrow R}\{x\in f:f(x)=x^{2}\}.$ Here the domain and codomain are the set of real numbers, but the range is the set of real numbers in the interval $[0,\infty).$ Maths also uses the word range to mean any defined interval between two numbers in a set. These two uses will not produce confusion in most cases.

The actual output of a function for some argument should be called an image. The image could be a single number, but it could also be the output of the function across some interval. That is, the input to a function is a subset of the domain and the output on that particular subset is the image.

The maths website, Wolfram, gives this definition for a function.
“A function is a relation that uniquely associates members of one set with members of another set. More formally, a function from $A$ to $B$ is an object $f$ such that every $a\in A$ is uniquely associated with an object $f(a)\in B$. A function is therefore a many-to-one (or sometimes one-to-one) relation. The set $A$ of values at which a function is defined is called its domain, while the set $f(A)\subset B$ of values that the function can produce is called its range. Here, the set $B$ is called the codomain of $f$.”

The input value to a function is called its argument. Some functions have more than one argument. From the perspective of the image, the argument is the pre-image of the output.

  • Domain is the $\mathbf{set}$ of possible input values.
  • Codomain is the $\mathbf{set}$ of possible output values.
  • Range is a restricted $\mathbf{set}$ of output values, restricted by the map.
  • Pre-image is a $\mathbf{set}$. (Note: not a function!). If the function is invertible, then the pre-image is the same as the image of the inverse function. If the function is not invertible, the pre-image is still a set, but we talk about the $“$pre-image of $B=\{x_{i}\}”$. That is, if the image of some function is the set $B$. Then the pre-image is a set, $f^{-1}(B)=f^{-1}(\{x_{i}\})$ such that when the pre-image is input to $f$ the image will be $B.$ Simplistically, the pre-image is the set that will give the image. $f(\{\text{pre-image}\})=\{\text{image}\}.$ Although simple enough, the notation can cause confusion because we use $f^-1(B)$ even though the function $f$ is not invertible.
  • Image is the $\mathbf{set}$ which is the output from a function.
Example: Consider the function $f\,:\,\mathbb{R}\rightarrow\mathbb{R}\qquad f(x)=3x.$ What is the domain, codomain, image for $x=3$, and pre-image of $21$?

Answer: The domain and codomain are each stated to be the set of real numbers, i.e. $\mathbb{R\rightarrow\mathbb{R}}$. To compute an image at $x=3$, we evaluate the function. $f(3)=3\cdot3=9$. Another way to say this is that $9$ is the image of $3$ under $f$. The pre-image of $21$ is the argument that must be given to $f$ in order to get the image, $21$. That is, the pre-image of $21$ is $7$.

$f\;:\;A\rightarrow B$ means that $f\,$ is a function which maps elements in the set $A$ to elements in the set $B.$ The domain of $f\,$ is $A$ and the codomain of $f\,$ is $B$. For example, $f\;:\;\mathbb{R}\rightarrow\mathbb{R}_{+} \{x\in f:x\mapsto x^2\}$. The symbol $\mapsto$ is read as “maps to”. It is very obvious when one begins using latex since “\mapsto” is the latex code for that symbol. These statements say that $f$ is a function such that the domain is the real numbers and the codomain is the positive real numbers, $\mathbb{R}_+.$ The function is not bijective (see definition below) and we cannot uniquely determine the input from the output. (i.e. for output $x^{2}$, $f(x)=\pm\sqrt{x^{2}}$) In order to get a bijective function in this instance, we need, $f\;:\;\mathbb{R}_{+}\rightarrow\mathbb{R}_{+}\quad x\mapsto x^{2}$. With this domain restriction, we can be sure that $f(x)$ is a positive number.

We use the arrow symbol $\rightarrow$ for “implies”, although many authors use $\Longrightarrow$ for “implies”. However, in the expression, $f:\;X\rightarrow Y,$ we mean that the function $f\;$ maps the domain $X$ into the codomain $Y.$ Our definition for a function says that all $x$ values map to a unique $y$ value. Clearly, one-to-one satisfies that definition. However, it is also satisfied by many-to-one. Conversely, if a single $x$ value maps to more than one $y$ value then the relation is not a function. Many conic sections, which have valid equations, are not functions by this definition.

one-to-one.png
Valid Functions: If the $x$ value maps to a different $y$ value in every case, the the function is “one-to-one”. If the $x$ value maps to the same $y$ value in many instances, then the function is still valid and called “many-to-one”. Most of the many-to-one relations that we encounter will be conic sections. When any single $x$ has multiple $y$ values, then it isn't a function.

An example of a one-to-one function is a non-vertical straight line. For every $x\in \mathbb{R}$ there is one and only one $y\in\mathbb{R}$. However, consider the polynomial function shown in figure Functions:Yes and No. It is a many-to-one. The horizontal line at $y=1$ crosses the function at least $5$ times, for $5$ different values of $x$. Next to the polynomial function in the figure is an ellipse. An ellipse in not a function. It has a one-to-many relation.

Many-to-one.png
Functions:Yes and No A function with a many-to-one relation. The left side is a proper function because each $x$ value maps to only one $y$ value. It is acceptable for multiple $x$ values to map to the same $y$ value. However, the right side, showing the graph of an ellipse is not a proper function. It does not fit with the definition because some (most) $x$ values map to two different $y$ values. It has a one-to-many mapping and under our definition, that is excluded.

A general function $f\,:\,A\rightarrow B$ accepts any member of set $A$ and makes output inside of set $B$, but it does not have to use all members of set $B$ and most of the time, the image of the function is a very limited subset of $B$.